<ul class="maintabmenu multipletabmenu">            
    <li ><a href="<?php echo base_url();?>administrator/restaurentmenus">Danh sách thực đơn</a></li> 
     <li class="current"><a href="<?php echo base_url();?>administrator/restaurentmenus/edit/<?php echo $term->term_id;?>">Sửa thực đơn</a></li>       
</ul>
<div class="content">                	
        <div class="edit-left">
            <form action="<?php echo base_url();?>administrator/restaurentmenus/edit" method="post" accept-charset="utf-8" id="formID" class="stdform">                    		
            <input type="hidden" name="term_id" value="<?php echo $term->term_id;?>" />
            <p><label>Tên thực đơn:</label></p>
            <p><span class="field"><input name="txttitle" value="<?php echo $term->term_name;?>" id="txttitle" class="longinput validate[required]" type="text"></span></p>
            <br>
            <p><label>Nhà hàng:</label></p>
            <p>
                <select name="restaurent_id">
                    <option value="0">-- Không thuộc nhà hàng nào --</option>
                    <?php 
                        foreach ($list_res as $res)
                        {
                            if($res->id == $term->restaurent_id)
                            {
                    ?>
                            <option value="<?php echo $res->id;?>" selected="selected"><?php echo $this->common->get_lang($res->name);?></option>                            
                    <?php 
                            } else
                            {
                    ?>
                            <option value="<?php echo $res->id;?>" ><?php echo $this->common->get_lang($res->name);?></option>
                    <?php             
                            }
                        }
                    
                    ?>                    
                </select>
            </p>
            <br>
            <p><label>Đường dẫn:</label></p>
            <p><span class="field"><input class="longinput validate[required]" value="<?php echo $term->term_slug;?>"name="txtslug" type="text"></span></p>
            <br>
            <p><label>Mô tả:</label></p>                            
            <p><span class="field"><textarea name="txtexcerpt"><?php echo $term->description;?></textarea></span></p>
            <br>
            <p><label>Thực đơn  cha:</label></p>                            
            <p>
                <select name="ddlTerm">
                    <option value="0">-- Không có thực đơn cha --</option>
                    <?php 
                        foreach ($term_option as $t)
                        {
                            $term_id_option = $t->id;
                            if ($t->id == $term->term_id) $term_id_option = $term->parent_term;
                            if($t->id == $term->parent_term)
                            {
                    ?>
                                <option value="<?php echo $term_id_option;?>"selected="selected"><?php echo $t->name_display;?></option>
                                
                    <?php 
                            } else 
                            {
                     ?>
                                 <option value="<?php echo $term_id_option;?>"><?php echo $t->name_display;?></option>
                     <?php            
                            }
                        }
                    ?>                    
                </select>
            </p>
            <br>
            <p class="stdformbutton">
                <input name="submit" value="Sửa" class="submit radius2" type="submit">                                
                <input value="Hủy" class="reset radius2" type="reset">
            </p>                            
        </form>                                        </div>
    <div class="list-right">
        <div class="contenttitle radiusbottom0">
            <h2 class="table"><span>Danh sách thực đơn</span></h2>
        </div><!--contenttitle-->
        <div class="tableoptions">
            <button class="deletebutton radius3" name="delete_term" value="<?php echo base_url();?>administrator/restaurentmenus/delete" title="table2">Delete Selected</button> &nbsp;                           
        </div><!--tableoptions-->	
        <table id="table2" class="stdtable stdtablecb" border="0" cellpadding="0" cellspacing="0">
            <colgroup>
                <col class="con0">
                <col class="con1">
                <col class="con0">
                <col class="con1">

            </colgroup>
            <thead>
                <tr>
                    <th class="head0" width="10"><input class="checkall" type="checkbox"></th>
                    <th class="head1">Tên thực đơn</th>
                    <th class="head0">Mô tả</th>
                    <th class="head0" width="60">&nbsp;</th>
                </tr>
            </thead>
            <tfoot>
                <tr>
                    <th class="head0"><input class="checkall" type="checkbox"></th>
                    <th class="head1">Tên Thực đơn</th>
                    <th class="head0">Mô tả</th>
                    <th class="head0">&nbsp;</th>
                </tr>
            </tfoot>
            <tbody>
                <?php 
                    foreach ($list_res_menu as $item)
                    {                        
                ?>
                    <tr>
                        <td class="center"><input value="<?php echo $item->id;?>" type="checkbox"></td>
                        <td>
                        <?php 
                            echo $item->name_display;
                        ?>
                        </td>
                        <td><?php echo $item->description;?></td>
                        <td class="center"><a class="edit" title="Sửa" href="<?php echo base_url();?>administrator/restaurentmenus/edit/<?php echo $item->id;?>">Sửa</a> &nbsp; <a class="delete" id="<?php echo $item->id;?>" name="delete" title="Xóa danh mục" href="<?php echo base_url();?>administrator/restaurentmenus/delete">Xóa</a></td>
                    </tr>   
                <?php }?>
            </tbody>
           
        </table>
         <?php echo $list_link; ?>
    </div>                                  
</div><!--content-->                
